[IA64] panic when ioremap hypercall fails.
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 18 May 2006 20:05:30 +0000 (14:05 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 18 May 2006 20:05:30 +0000 (14:05 -0600)
This can occur when dom0 vp model xenlinux is used on P=M model xen/ia64.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
linux-2.6-xen-sparse/include/asm-ia64/hypercall.h

index 368081e523f5e2a172c5011dc26132b68034509a..c2b779bfea57a470936b83fb1611237467eb455d 100644 (file)
@@ -318,6 +318,7 @@ static inline void exit_idle(void) {}
 #define do_IRQ(irq, regs) __do_IRQ((irq), (regs))
 
 #ifdef CONFIG_XEN_IA64_DOM0_VP
+#include <linux/err.h>
 #include <asm/xen/privop.h>
 
 #define _hypercall_imm1(type, name, imm, a1)                   \
@@ -419,6 +420,10 @@ HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size)
        unsigned long ret = ioaddr;
        if (running_on_xen) {
                ret = __HYPERVISOR_ioremap(ioaddr, size);
+               if (unlikely(IS_ERR_VALUE(ret)))
+                       panic("hypercall %s failed with %ld. "
+                             "Please check Xen and Linux config mismatch\n",
+                             __func__, -ret);
        }
        return ret;
 }